package com.coolt.client.ui;

import com.coolt.client.logic.ListarMensagem;
import com.coolt.client.ui.AppConstants;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class Mensagens extends Composite {
	private static VerticalPanel verticalPanel;
	private static final AppConstants CONSTANTS = (AppConstants) GWT.create(AppConstants.class);
	public Mensagens() {

		verticalPanel = new VerticalPanel();
		initWidget(verticalPanel);
		verticalPanel.setWidth("422");
		
		

		final HorizontalPanel titulo = new HorizontalPanel();
		verticalPanel.add(titulo);
		titulo.setSize("422", "26");
		titulo.setStyleName("fundo_titulo_maior");

		final Hyperlink mensagensHyperlink = new Hyperlink("Mensagens", "some history token");
		mensagensHyperlink.setStyleName("linkssecoes");
		titulo.add(mensagensHyperlink);
		titulo.setCellVerticalAlignment(mensagensHyperlink, HasVerticalAlignment.ALIGN_MIDDLE);

		final Hyperlink verTodosHyperlink = new Hyperlink("Ver Todos", "some history token");
		verTodosHyperlink.setStyleName("linkssecoes");
		titulo.add(verTodosHyperlink);
		titulo.setCellVerticalAlignment(verTodosHyperlink, HasVerticalAlignment.ALIGN_MIDDLE);
		titulo.setCellHorizontalAlignment(verTodosHyperlink, HasHorizontalAlignment.ALIGN_RIGHT);
		
		ListarMensagem mensagemList=new ListarMensagem();
		verticalPanel.add(mensagemList.getMensagens());
	}
	public static VerticalPanel getVerticalPanel() {
		return verticalPanel;
	}
}
